home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / misc / pdflib / bindings / python / hello.py next >
Text File  |  1999-01-01  |  477b  |  21 lines

  1. #!/usr/bin/python
  2.  
  3. from pdflib import *
  4.  
  5. fp = fopen("hello_python.pdf", "w")
  6. ip = PDF_get_info()
  7. PDF_info_Creator_set(ip, "hello.py")
  8. PDF_info_Author_set(ip, "RJS")
  9. PDF_info_Title_set(ip, "Hello world (Python)")
  10. PDF_info_fontpath_set(ip, "../../fonts")
  11.  
  12. p = PDF_open(fp, ip)
  13.  
  14. PDF_begin_page(p, 595, 842)
  15. PDF_set_font(p, "Helvetica-Bold", 18.0, winansi)
  16. PDF_set_text_pos(p, 50, 700)
  17. PDF_show(p, "Hello world!")
  18. PDF_continue_text(p, "(says Python)")
  19. PDF_end_page(p)
  20. PDF_close(p)
  21.